home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 24
/
AMIGAplus Sonderheft 24 (2000)(Falke)(DE)[!].iso
/
c
/
xingplay.doc
< prev
next >
Wrap
Text File
|
2000-01-01
|
7KB
|
204 lines
_________ ________ __ __ __ ________ _______ __ __
/\___ ___\/\______ \ /\ \ /\ \ /\ \/\ _ _ \/\_____ \/\ \ /\ \
\/__/\ \__/\/______\ \\ \ \\ \ \\ \ \ \ \\_\\ \/_____\ \ \ \\_\ \
\ \ \ /\ _____\\ \ \\ \ \\ \ \ \ \__/\ \/\ ____\ \ ___ \
\ \ \ \ \ \____/_\ \ \\ \ \\_\ \ \ \ \ \ \ \ \___/\ \ \_/\ \
\ \_\ \ \_\ /\_\\ \_\\ \______\ \_\ \ \_\ \_\ \ \_\\ \_\
\/_/ \/_/ \/_/ \/_/ \/______/\/_/ \/_/\/_/ \/_/ \/_/
XingPlay v1.1 by
Nils Corneliusen, Triumph
-------------------------
Introduction
------------
XingPlay is the fastest XING-style Mpeg player available.
So, what the h*** is an XING-style mpeg file anyway? Well, it's like
a normal mpeg file but with certain limitations:
* Resolution: 160x120
* Only I-frames
An I-frame is an "intracoded frame" or a frame that does not depend on
other frames. The compression method is much like that of JPEG. A
normal mpeg file normally has an I-frame every 5th frame to serve as
basis for the other frame types.
So why use only I-frames? First of all, if you're grabbing live video
and using one of the low cost mpeg boards for PC (yuk), you'll most
certainly get only I-frames. To produce a real mpeg in real time,
you'll have to buffer a lot of frames to create the other frame types.
This means adding a lot of fast ram and expensive enocding chips.
The same applies to decoding. You have to buffer a lot of frames
(normally 5) and apply changes according to the other frame types. A
fun little job that usually is pretty slow.
XingPlay takes the easy approach. It assumes that any file you pass
to it is an Xing-style file. All error checking is ignored and all
the low level decoding routines are written in assembler. Direct
rendering routines are also provided to avoid going through cgfx/
WritePixelArray() or the like (this would remove 20% of the speed).
All rendering modes support double buffering. To avoid jerking while
playing back an mpeg, the entire file is loaded into memory at once.
If you're low on memory, tough luck!
Since color and intensity are compressed separately (the intensity
buffer is 4 times bigger than each of the 2 color buffers), it's a lot
faster to replay the animation in grey mode.
Usage
-----
The options are changed to follow normal Amiga guidelines a bit
closer. This means that addons like "XingPlayGUI" won't work any
more. Oh well.
Template: XingPlay T=TIMING/K/N,G=GFXMODE/K/N,P=PIXELMODE/K/N,L=LOOP/K/N
LOOP (or L)
Must be followed by a numeric argument specifying the number of times
you want the animation to be played. If you specify "LOOP 0", the
animation will loop forever (or until you press LMB).
TIMING (or T)
Must be followed by a numeric argument specifying the minimum number
of frames to pass between each frame. This provides you with a crude
timing mechanism. If you specify "TIMING 10", you will get no more
than 5 frames per second - less if you don't have enough cpu power.
You guessed right, the timing is tied to the VB interrupt.
GFXMODE (or G)
Must be followed by a numeric argument specifying the display device.
Possible values are:
1: Cybergraphics 32 bit mode
Works on any gfx card supporting the ARGB, BGRA or RGBA color modes.
The cards I know of are Cybervision/64, Cybervision3D, Piccolo SD64.
Pretty fast mode, but a lot of data has to be shifted over the bus.
In 2x2 mode, you're pushing it! (320*240*4=300k/frame!)
2: Cybergraphics 16 bit mode (RGB16/BGR16/RGB16PC/BGR16PC)
Works on any gfx card supporting the RGB16, BGR16, RGB16PC or BGR16PC
modes. Not all have been tested, but any decent gfx card should have
one of these modes. Tell me if it doesn't work! It's a bit more easy
on the bandwith, but the decoding is a bit fuzzier. Should be faster
than mode 1 on low bandwith cards (PicassoII etc.).
3: Cybergraphics 8 bit mode grey
Works on any gfx card supporting the LUT8 mode. All cards I guess.
However, the 8 bit mode normally only provides an 18 bit palette.
This means that you only get 64 shades of grey. Extremely fast mode -
watch it fly on my CV64!
4: AGA HAM8 8 bit (AGA default)
Works on AGA machines only and uses a PAL display. The 2x2 pixel mode
is actually faster than the 1x1 mode when using HAM8.
5: AGA Grey 8 bit
True 8 bit grey mode for AGA machines, PAL display. Fast.
6: ECS Grey 4 bit (ECS default)
4 bit grey mode for older machines, PAL display. Looks pretty awful
but is really fast!
All Cybergfx modes are displayed on a 320x240 screen. If you don't
have such a resolution defined, the closest match is used. This might
look weird, since a double height screen is opened to provide double
buffering. Define a 320x240 mode now!
PIXMODE (or P)
Must be followed by a numeric argument specifying the pixel mode.
Possible values are:
1: 1x1 pixel mode
2: 1x1 pixel mode, black dither
3: 2x2 pixel mode (default)
Example:
XingPlay GFXMODE 1 PIXMODE 3 TIMING 5 LOOP 0 SpaceBattle.mpeg
This will play the file "SpaceBattle.mpeg" on your gfx card in 32 bit
rendering mode (CV64/CV3D/SD64) using 2x2 pixels with a max of 10
frames per second. The animation will loop until you interrupt it
with the left mouse button.
How to create Xing style mpegs
------------------------------
To create an Xing-style mpeg, you have to invest in ImageFX. With
that out of the way, start ImageFX and invoke the "BuildMPEG.ifx"
arexx script. Select the "Xing override" option and specify input
pattern as follows:
Work:blah/frames/frame_%%%%
where %%%% means that frame number will be inserted here and be no
less than 4 numbers (0001,0002 etc.). A single % means "insert the
number as it is" (1,2,3,4,...10 etc.).
If you get confused by the other options (Bit rate, target size etc.),
just ignore them. That's why you turned "Xing override" on!
The frames can be in any format that can be loaded by ImageFx. If the
frames are not in 160x120 size, they will be scaled automatically.
A word about speed
------------------
If you have a 060 system running AGA only, you may notice that
XingPlay is no faster than other run-of-the-mill players. This is
because it's impossible to copy any faster to chipram. Get a gfx card
and you'll see it fly!
Where to get XING-style mpegs
-----------------------------
The following files are tested and seems to work ok with XingPlay
v1.1. They can easily be found on Aminet:
pix/anim/SpaceBattle.lha - Great 3d anim by Triumph :-)
pix/anim/MommaGlob.mpg - use loop mode on this one!
pix/anim/Gangster.lha
pix/anim/SpaceWar.lha
pix/anim/SpaceRace.mpg
You might try some of the other mpegs in the pix/anim directory, but
remember that XingPlay will crash if it's not an Xing-style mpeg!
More Information
----------------
For more information about Triumph, try our web site:
http://www.triumph.no
There you'll find cool information about other projects, my own
homepage and the like.
Legal stuff
-----------
XingPlay is released as freeware. Use it as you wish. This readme
file must always accompany the executable.
Author
------
email: corneliusen@triumph.no (try spelling the name right!)
www: http://www.triumph.no/nils
snail: Nils Corneliusen
Frydens gate 5A
0564 Oslo
Norway